-- GENERATED SPELL FOR [Skullsplitter Beastmaster] --


function spell0_784(pUnit, Event) --@Head Crack,n/a--
pUnit:FullCastSpellOnTarget(3148,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_784', 20328, 1)
end

function spell1_784(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_784', 685, 1)
end

function spell2_784(pUnit, Event) --@Skullsplitter Pet,Self--
pUnit:FullCastSpellOnTarget(3621,pUnit)
pUnit:RegisterEvent('Sorts_784', 623, 1)
end

function Sorts_784(pUnit, Event)
local choix_sorts_784 = math.random(0, 2)
if choix_sorts_784 == 0 then
pUnit:RegisterEvent('spell0_784', 1, 1)
end
if choix_sorts_784 == 1 then
pUnit:RegisterEvent('spell1_784', 1, 1)
end
if choix_sorts_784 == 2 then
pUnit:RegisterEvent('spell2_784', 1, 1)
end
end

function mob784_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_784', math.random(1500, 3000), 1)
end

function mob784_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob784_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob784_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(784, 1, 'mob784_Action')
RegisterUnitEvent(784, 2, 'mob784_Leave')
RegisterUnitEvent(784, 3, 'mob784_Kill')
RegisterUnitEvent(784, 4, 'mob784_Die')
